<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.io.PrintWriter"%>
<%@ page import="java.util.*"%>
<%@ page import="javax.servlet.*"%>
<%@page import="model.HocKy_KHHT_CoMonHocM"%>
<%@page import="dao.HocKy_KHHT_CoMonHocD"%>
<%
	HocKy_KHHT_CoMonHocD dao = new HocKy_KHHT_CoMonHocD();
	int strStatus = 0;
	int check = 0;
	String id_mon_hoc = request.getParameter("id_mon_hoc");
	String id_hoc_ky_khht = request.getParameter("id_hoc_ky_khht");
	try {
		if(id_mon_hoc!="" && id_hoc_ky_khht!=""){
			String[] str = id_mon_hoc.split(",");
			for (int k = 0; k < str.length; k++) {
				if (dao.checkExists(Integer.parseInt(str[k]), Integer.parseInt(id_hoc_ky_khht)) >= 1) {
					check = 1;
				}
			}
			if (check == 1) {
				strStatus = 1;
			}
		}
	} catch (Exception ex) {
		ex.printStackTrace();
	}
	out.println(strStatus);
%>